#ifndef _INCLUDE_OPENNETWORK_
#define _INCLUDE_OPENNETWORK_

/*!
    Copright: Kai "DrHalan" Mast - www.freakybytes.org

    This file is part of OpenNetwork.

    Open Networks license (zlib):
    -------------------------------------------------------------------------
    This software is provided 'as-is', without any express or implied
    warranty.  In no event will the authors be held liable for any damages
    arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute it
    freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
        claim that you wrote the original software. If you use this software
        in a product, an acknowledgment in the product documentation would be
        appreciated but is not required.
    2. Altered source versions must be plainly marked as such, and must not be
        misrepresented as being the original software.
    3. This notice may not be removed or altered from any source distribution.
    ----------------------------------------------------------------------------
*/

#include "PointerArray.h"
#include "INetworkPort.h"
#include "SNetworkAddress.h"
#include "INetworkCallback.h"
#include "EMessageType.h"
#include "EPortType.h"
#include "ESendMessageResult.h"

namespace onet
{

    //! Creation functions for the acutal classes
    INetworkPort* createNetworkPort(EPortType type, INetworkCallback* callback, u16 maxPeers, u16 port = 0, bool listen = true, bool IPv6 = false);

    //! Gets the seconds elapsed since process creation
    u32 getLocalTime(void);

    //! Unified sleep function (in ms)
    void sleep(u32 time);

    //! Function to convert a string containing an url to a NetworkAddress-Struct
    SNetworkAddress createAddressFromURL(const std::string url, const u16 port = 0);

    //! Stuipd start/end functions needed cause of winsock
    bool start(void);
    void end(void);

} //!end namespace onet

#endif

